Personal tools
You are here: Home gvSIG Projects gvSIG Desktop Documentation User documentation gvSIG-Desktop 1.10. User Manual (online)
gvSIG Desktop
gvSIG Desktop

Cached time 11/22/13 03:58:36 Clear cache and reload

 
Document Actions

gvSIG-Desktop 1.10. User Manual

by Victor Acevedo last modified 2011-09-13 17:10


Vectorial

Geoprocessing tools

Introduction

The gvSIG geoprocessing extension allows you to apply a series of standard processes to the vector information layers loaded in the layer tree in a gvSIG view (ToC), thus creating new vector information layers which will provide new information for the source layers.

The following geoprocesses have been implemented in the first version of the geoprocessing extension:

  • Buffer.
  • Clip.
  • Dissolve (by adjacents and alphanumerical criteria).
  • Merge
  • Intersection.
  • Join.
  • Spatial Join.
  • Convex Hull (minimum convex polygon).
  • Difference.

The output layer can take one of the output formats supported by gvSIG (it can only be saved in shp format at the moment).

When some geoprocessing tools are applied (for example, Clip) a window appears in which a spatial index can be created for the input layer. This is an internal process which is only carried out once per layer and per new project and speeds up the spatial intersection processes.

introduccion.img/crearIndeiceEspacial_es.png

To create a spatial index for the input layer which can be used by the geoprocesses, click on “Yes”.


Accessing the geoprocesses

You can run the geoprocesses available in gvSIG with the geoprocessing wizard by clicking on the following tool bar button:

acceso-a-geoprocesos-en.img/botonGeoprocesos_en.png

The “Geoprocess toolbox” will appear and you can use it to select the geoprocess you require. To access the different geoprocesses, pull down the tree in the window shown below (double click with the left button of the mouse on the "Geoprocesses" folder and the rest of the folders will appear).

acceso-a-geoprocesos-en.img/asistenteGeoprocesos_en.png

When you have found the geoprocess you wish to use, click on the “Open geoprocess” button.

acceso-a-geoprocesos-en.img/explicacionGeoproceso_en.png

Buffer
Introduction

This geoprocess generates “areas of influence” around the vector element geometries (points, lines and polygons) of an “input layer”, thus creating a new polygon vector layer.

Several equidistant concentric radial rings can be generated around the input geometries. Moreover, in the case of polygon input geometries, the area of influence can be outside the polygon, inside the polygon or both inside and outside it. Some examples of the creation of areas of influence include:

  • Which urban areas lack schools in a 1000m radius.
  • Which wells do not comply with regulations on observing the minimum distance between two consecutive wells.
  • River bed flood zones to monitor flood risks.

Creating an area of influence or buffer

When you click on the “Geoprocessing wizard” button, the following dialogue appears:

area-de-influencia-en.img/AreaInfluencia_en.png

If you select “Buffer” and click on the “Open geoprocess” button, the window associated with this process is shown:

area-de-influencia-en.img/introduccionDatosBufferNuevo_es.png

The form is divided into the following parts:

area-de-influencia-en.img/capaDeEntradaNuevo_24_en.png

Selecting the elements whose buffer is to be computed. This is a pull-down list in which you can select the vector layer the calculation is to be applied to. If you wish, you can enable the “Use selected features only” check box so that the process only computes the buffer of the elements currently selected in the specified layer.

area-de-influencia-en.img/seleccionDeElementos_en.png

Inputting the features of the buffer to be computed. You can choose to input the buffer defined by distance (in the first text box) or to input a field in the input layer, from which the buffer radius value to be applied will be taken. This second option allows you to apply different buffer radii to different vector elements (whilst the first option applies the same radius to all the elements in the input layer). When the buffer of all the input layer elements has been generated, the “Dissolve features” option allows you to merge the elements whose geometries touch each other in a second iteration.

The “Rectangle end cap" option allows you to generate buffers with perpendicular edges (not rounded). Selecting the number of concentric buffers and their situation regarding the original geometry. The gvSIG “Buffer” geoprocess allows you to generate several equidistant areas of influence of the original geometry (for example, if the buffer distance to be applied is 200m and you choose to generate two concentric radial rings, the buffer distance of the second ring will be between 200-400m. Currently, you can only generate a maximum of three concentric radial buffer rings for efficiency reasons. If the vector layer we are working on is a polygon layer, the “Create Buffer…” option will be enabled, thus allowing the user to generate buffers outside, inside and both inside and outside the original polygon.

area-de-influencia-en.img/seleccionarNumerobuffers_en.png

Introducing the result layer characteristics. Currently, the result of running a geoprocess can only be saved as an shp file. Thus, gvSIG allows you to select an existing shp file to overwrite it or to specify a new one. As new formats are supported to save the result of the geoprocesses, wizards will be provided to indicate the characteristics of these formats.

area-de-influencia-en.img/capaDeSalida_en.png

When you have input all the necessary information to compute the buffer, and clicked on the “Ok” button, a check routine is carried out to ensure that the information input is correct: whether the radius distance is numerical, whether the attribute from which the buffer radii are taken are numerical, whether a result file has been input, etc. If the check routine is not correct, a dialogue box appears so that the input data can be corrected.

If the input information that you have entered is correct, a window with a progress bar appears, in which the buffer processing rate is shown.

area-de-influencia-en.img/procesandoBuffer_en.png

The process can be cancelled at any time by clicking on the “Cancel” button. As a consequence, the result file and any other intermediate product generated as a result of running the process are deleted. Whilst the buffer computing process is underway, other tasks can be carried out, such as changing the zoom or adding new layers to the layer tree in the gvSIG view. Other tasks can be carried out because all the geoprocessing extension geoprocesses are run in the background. When the process has finished, the new result layer is added to the layer tree in the active view. It is made up of buffer polygons with a specified radius based on the source layer.

area-de-influencia-en.img/bufferEnFinal_en.png

Finally, the “Dissolve elements” option can be useful in specific situations (such as when the aim of computing the buffer polygons is to determine the total surface area affected by a phenomenon: quarantine areas, etc.), because when the generated polygons are merged the surface area covered by the buffer will be a real surface area, i.e. the sum of two buffers will not have any overlays.

area-de-influencia-en.img/EntidadesSinDisolver_en.png

The above image shows non-merged overlay polygons. The total area covered by the phenomenon does not coincide with the sum of the individual areas.

area-de-influencia-en.img/disolverPoligonos_en.png

However, this second image shows merged overlay polygons. The total area covered by the phenomenon is real. When the buffer computing process includes the merger of overlay areas (dissolve) we cannot predict its exact duration (we do not know how many polygons will touch each other a priori). This is why the gvSIG geoprocessing extension does not show us a progress bar as such, it shows us a bar which periodically reaches the end and then goes back to the beginning. This type of process is called an “indeterminate” process.

area-de-influencia-en.img/progresoDisolverBuffer_en.png

Intersection
Introduction

This geoprocess operates on two layers, the “input layer” and the “overlay layer”, whose geometries can be polygons, lines or points.

interseccion-en.img/interseccionAccesoNuevo_en.png

It calculates the intersection with the different geometries in the “overlay layer” for each geometry in the “input layer”, thus creating a new element for each intersection. This element will take all the alphanumerical attributes in the geometries that created it (input and overlay). This is why (it models space areas which comply with the condition of belonging to the two polygons, lines or points that created it) this geoprocess is known as “Spatial AND" operator.

An example of how this geoprocess can be applied:

Given a land use layer (e.g. Corine2000), and a national geological map layer, you can obtain a polygon layer with homogeneous information on land use and geological material.


Running the 'Intersection' geoprocess

After selecting the "Intersection" geoprocess, the following dialogue appears:

interseccion-en.img/introdcuccionDatosInterseccionNuevo_en.png

Select the input layer and the overlay layer. You must also specify a file in which to save the results. Finally, click on "Ok" and the geoprocess will be run.

interseccion.img/antesInterseccion_es.png

In this case, we will use a very simple example to better understand the function of the geoprocess. The previous figure shows two overlaying polygons. The result of launching the “Intersection” geoprocess with these layers as parameters is as follows:

interseccion.img/despuesInterseccion_es.png

Clipping
Introduction

This geoprocess allows you to limit the working area of a vector layer (points, lines or polygons), and to extract an area of interest from it.

recortar_en.img/recortarNuevo_en.png

To do so, you need an “input layer” (the layer you will use to extract an area) and a “clipping layer” so that the union of the geometries included in the "clipping layer" defines the working area.

The geoprocess checks all the vector elements in the “input layer” and will calculate the intersections for the vector elements contained in the working area defined by the “clipping layer”, so that in the "result layer" only the vector elements of our working area will appear. The geometry portion that lies outside the working area will be clipped. The alphanumeric schema of the input layer remains intact.

Examples of use:

Setting up a local GIS would allow you to include national or regional maps and then to delimit the city or town as the working area.


Running the Clipping geoprocess

When the "Clip" geoprocess has been selected, the following dialogue appears.

recortar_en.img/introduccionDatosNuevo_en.png

This dialogue allows you to select which layer you wish to clip, and gives you the chance to only clip the elements which are selected in the layer.

It allows you to select which layer will be used as the clipping layer and whether you wish to use the union of all the polygons in the clipping layer as the clipping polygon or just the selected elements.

Finally, as in the case of the other geoprocesses in gvSIG's geoprocessing extension, you can define how the result layer will be saved (at present you can only save it as a shp file).

recortar_en.img/recorteFinal_en.png

As a result of running the geoprocess, you will have a new layer in which only the geometries which came under the union of the clipping geometries have been kept.


Dissolve
Disolve

This geoprocess only acts on one “input layer”. The process analyses each entity in the "input layer" and merges the elements that have an identical value for a specific field into one element. Moreover, it allows you to involve spatial criteria in the decision to merge several features. This allows you to establish that for two elements to be merged, they must be adjacent to each other in addition to having the same value in the specified attribute.

disolver-en.img/disolverNuevoAcceso_en.png

Example: We have a polygon layer which represents the municipalities of a particular autonomous region and we need a polygon layer with the provinces which make up this region. We can generate a province layer by launching the “Dissolve” geoprocess and specifying that the polygons that have the same value for the "PROV" field in which a unique code for the province is specified are merged.


Running the 'Dissolve' geoprocess

Using the previous example, we start by taking a "local layer" which we wish to convert into a "provincial layer".

disolver-en.img/inicioDisolver_en.png

When the "Dissolve" geoprocess has been selected, the following window appears:

disolver-en.img/introduccionDatosDisolverNuevo_en.png

Firstly, select the layer you wish to dissolve (you can only work with a selection of elements in this layer).

disolver-en.img/capaEntradaNuevo_en.png

You then need to specify the attribute of this layer which is going to be used as the criterion to merge the adjacent polygons. In our example, we must choose the “PROV” attribute.

disolver-en.img/campoParaDisolver_en.png

The polygons to be merged must have the same value for the dissolving attribute and in addition, you can choose whether they are adjacent to each other (spatial criteria). If you wish to choose this option, enable the "Only dissolve adjacents" check box. The gvSIG geoprocessing module allows you to keep a summary of the input layer polygon attributes once they have been merged. To do so, the “Summary function” concept is introduced. As each polygon of the “Dissolve” geoprocess result layer is the product of joining several input layer polygons, a summary function on the numerical attributes of the merged polygons can be applied.

disolver-en.img/atributosNumericosDisolver_en.png

If you click on the button with the "<-" icon, a dialogue will be shown in which you can choose one of several summary functions for a selected attribute.

disolver-en.img/funcionesDeAgrupamiento_en.png

The summary functions supported are maximum, minimum, average and summatory. A field will be included in the result layer for each summary function selected for the numerical attributes you have selected a summary function for.

When you have specified the field you wish to merge and the numerical attributes you wish to obtain a summary value for in the result layer, you are ready to run the geoprocess.

disolver-en.img/disolverfinal_en.png

Merge
Introduction

This geoprocess acts on one or several layers, generating a new layer which joins all the geometries in the “input layer”. The "result layer" of this geoprocess will keep the attributes of the "input layer" specified by the user. For the rest of the layers which have not been selected, the attributes whose name and type of data coincide with any of the attributes in the selected layer will be kept.

juntar-en.img/juntarNuevoAcceso_en.png

Example:

When a cartographic series arrives which is separated into sheets and you wish to join the content of the different sheets in one layer. This is the case of the Magna series of sheets, published by the Spanish Technological and Geomining Institute (ITGME).


Running the 'Merge' geoprocess

If you select the “Merge” geoprocess, the following dialogue appears:

juntar-en.img/introduccionDatosJuntarNuevo_en.png

The geoprocess allows any of the layers loaded in the layer tree in the gvSIG active view as an input layer. To run the process, first select the layers you wish to merge in the "Input layers" text box. Then, click on the "Select” button. A new window will open in which you can give the new layer file a name or choose a target file.

juntar-en.img/guardarJuntar_en.png

Click on the "Save" button when you have finished and gvSIG will return you to the geoprocess window. Click on the "Ok" button. This will start the geoprocess.

juntar-en.img/geoprocesandoJuntar_en.png

A new layer will be created at the end of the process which will be added to the view.

juntar-en.img/juntarfinal_en.png

However, in the example of the sheets in a cartographic series, it would be awkward to load all the pages in the series one by one. Thus, there is an extra option to select a directory and to add all the layer files (with extensions supported by gvSIG) contained in this directory to the geoprocess input layer list. The only layer files currently supported are shp format files. If you click on the “Folder with files...” button and select a directory, a list of the layer files contained in it are shown and can be selected as part of the geoprocess input layers.

juntar-en.img/carpetaCApas_en.png

Until you select at least one layer to merge with one of the two possible lists (the layer list in the gvSIG layer tree and the layer list contained in the specified directory), no layer will be shown in the pull-down list. This list allows you to select which layer is going to define the attributes of the result layer’s attributes. When you select the layers to merge in one of the two lists, the layer whose attributes we wish the result layer to have and when you have specified the file you wish to save the result layer in, you can run the geoprocess. An initial requirement is that all the geoprocess input layers have the same type of geometries.

juntar-en.img/juntarCapasCarpeta_en.png

The result will be a new layer with all the input layer geometries.


Convex hull
Introduction

This geoprocess calculates the “Convex hull”, or the smallest convex polygon which surrounds all the vector elements in an “input layer”.

It only works with an “input layer” whose geometry type can be any type (point, line or polygon). There are different types of applications for this geoprocess: Determining the coverage area for a specific geographical phenomenon.

Calculating the diameter of the area covered by a series of geometries, etc.

envolvente-convexa-en.img/convexHullNuevoAcceso_en.png

Creating a convex hull

If you select the “Convex hull” geoprocess, the following dialogue appears:

envolvente-convexa-en.img/introduccionDatosConvexHull_en.png

After selecting the layer whose “Convex Hull” you wish to calculate and specifying an shp result file, you can run the geoprocess and generate a new result layer.

envolvente-convexa.img/puntosSeleccionadosConvex_es.png

The following image shows the convex hull created which surrounds all the points in the input layer.

envolvente-convexa.img/conveHullDePuntos_es.png

Difference
Introduction

The “Difference” geoprocess works with two layers, the “input layer” and the “overlay layer”. It is known as “Spatial NOT” and allows you to obtain the areas in a layer which are not present in the other layer. The geometries in both the “input layer” and the “overlay layer" must be polygons, lines or points. The alphanumerical schema of the “input layer” will remain intact in the "result layer", as in the end it gives more information about it.

diferencia-en.img/diferenciaNuevoAcceso_en.png

This geoprocess is very useful in numerous situations. For example, it can be used to complement the "Clip" geoprocess. If “Clip” allows you to exclude everything that does not belong to a geographical area under study, "Difference" allows you to do exactly the opposite; exclude a specific area from our working layer.

A useful example:

Transferring territorial jurisdiction between different governing bodies. Thus, if the national government transfers certain jurisdiction to a regional authority, it can decide to exclude the geographical area of the transfer in question from its data bases.


Running the 'Difference' geoprocess

Running the “Difference” geoprocessClick on the “Open Geoprocess” button to access the dialogue window which allows you to run the "Difference" geoprocess.

diferencia-en.img/introduccionDatosDiferenciaNuevo_es.png

You can enable the “selected features” check boxes at this point of the geoprocess for the input layer and the overlay layer. If you click on the “Ok” button, the geoprocess will be run.

diferencia.img/diferenciaInicio_es.png

In the following image, the “Difference” geometry appears in black between a flood zone and one of the selected cities or towns. In this case, the new layer resulting from the calculation of the difference will take the schema (alphanumerical attributes) of the geoprocess input layer.

diferencia.img/diferenciaFinal_es.png

Union
Introduction

This geoprocess is similar to the “Intersection” and "Difference" geoprocesses in that it operates on two polygon, line or point layers to obtain their intersections (this is why these three geoprocesses are known as “overlay geoprocesses”).

union-en.img/unionNuevoAcceso_en.png

The "Union" geoprocess is known as "Spatial OR", because the result layer is made up of the geometries which appear in the two layers (intersections between the polygons, lines or points), plus the geometries which only appear in one of the two associated layers.

This means that the geoprocess carries out three analyses:

the first time it calculates the intersection of both layers, the second time it calculates differences between the first layer and the second, and the third time it calculates the differences between the second layer and the first.

This geoprocess may be of interest if you wish to generate new layers which show the occurrence of two phenomena so that the occurrence of one of the two or of both is highlighted.


Running the "Union" geoprocess

If you select the “Union” option, the following dialogue appears:

union-en.img/introducirDatosUnionNuevo_en.png

When you have selected the input layer, the clip layer and an output layer, click on "Ok".

union.img/resultadoUnion_es.png

The result layer will have all the intersections and differences between the two layers. If you click on the “Information” button and then on the different polygons in the result layer, you will see that the intersections have all the attributes, whilst the differences only have the attributes of the layer that created them.


Spatial join
Introduction

This geoprocess allows you to transfer the attributes of one layer to another based on a common element. In contrast to the join sql operator in the relational data bases, in this case, the common element is not that a field of the two tables takes the same value, but that the related elements in the two layers meet some spatial criteria.

enlace-espacial-en.img/introducirDatosUnionNuevo_en.png

The “Spatial join” geoprocess allows you to follow two types of spatial criteria to establish the spatial link:

Nearest neighbour (1->1 relationship). This assigns the attributes of the nearest element in the related layer to an element in the source layer.

If the nearest element intersects (or in the case of polygons is “Contained in”) with the source element, the algorithm will take the first element analysed in the possible intersections.

Contained in (1->M relationship). This relates an element in the source layer with several elements in the destination layer (in particular, with those that intersect).

In this case, the source layer will not inherit the related layer’s attributes, but the operation will be very similar to the "Dissolve" geoprocess.

The user can choose one or several summary functions (average, minimum, maximum, summatory) to be applied on the numerical attributes of the related layer for the M elements related to an element in the source layer.


Running a 'Spatial Join'

When you have selected the "Spatial join" option, the following window appears:

enlace-espacial-en.img/introducirDatosUnionNuevo_en.png

This window is practically the same as the windows in the overlay geoprocesses (Union, Difference, Intersection) with one difference.

It allows you to choose whether you want to run a 1-1 relationship (using the nearest neighbour spatial criterion) or run a 1-N relationship (using the “Intersect” or “Contained in” spatial criterion).

The choice can be made by enabling or disabling the "Use nearest geometry" check box. If when you have selected the source layer and the layer to be related, the geoprocess is launched and you have not enabled the "Use nearest geometry" check box, a window appears in which you can select the summary functions you wish to apply for each numerical attribute of the layer to be related:

enlace-espacial-en.img/funcionesDeAgrupamiento_en.png

The summary functions are the same as in the “Dissolve” geoprocess:

enlace-espacial-en.img/funcionesAgrupamiento_en.png

Thus, the attributes transferred to the source layer will be the result of the summary functions selected for each numerical field. If you run the geoprocess and the “Use nearest geometry” option is enabled, this window does not appear.

enlace-espacial.img/enlacaEspacialfinal_es.png

2D Translation
Introduction

This geoprocess allows a translation transformation to be applied to all the points, lines and polygons of the geometries in the input layer. The geoprocess can be applied to all types of vector layers (shp, dgn, dxf…). To do so, the movement on X and Y must be specified.

This geoprocess is extremely useful when combining cartographies which come from different sources, a process which is referred to as conflation. Bear in mind that although translations can be carried out on all types of vector layers (shp, dgn, dxf, dwg…), the resulting output layer will always be a shape file. In other words, the input layer can be a shp, dxf or dgn file, but when translation is applied to these layers, the result will be one or various different output layers which are always shape files.

When a translation is carried out in which the input layer is a vector layer which is not a shape file, the result of the translation will be three layers in SHP format (one line layer, one point layer and one polygon layer).

If, for example, the input layer to which the translation is applied contains only points and lines, the polygon .shp file will be created but it will be empty.

NB. At the end of this section there is a table giving details of the relationship between the type of input file and the resulting output layer.


Translating a vector layer

Firstly, load a vector layer in gvSIG and then click on the geoprocessing wizard in the tool bar.

traslacion-2d.img/botonGeoprocesos_en.png

Select the option “2D Translation” from the “Data Conversion” folder. Click on the “Open Geoprocess” button and the geoprocess data input window opens. For the input layer, select the vector layer (dgn, dxf, dwg, shp…) you wish to translate and introduce the values corresponding to X and Y. Select an output layer and click on “Ok”.

traslacion-2d.img/explicacionGeoproceso_es.png

The following image shows the result of applying the translation process.

traslacion-2d.img/introduccionDatosTraslacion_es.png

Relationship between the type of layer before and after translation.

Input cover Output cover/s
Point Shp file Point Shp file
Multipoint Shp file Multipoint Shp file
Line Shp file Line Shp file
Polygon Shp file Polygon Shp file
Dxf (points, lines, polygons)

Point Shp file

Line Shp file

Polygon Shp file

Dgn (points, lines, polygons)

Point Shp file

Line Shp file

Polygon Shp file

Dwg (points, lines, polygons)

Point Shp file

Line Shp file

Polygon Shp file


Reprojection
Introduction

This geoprocess allows you to change the geodesic projection of the vector elements in the input layer. In order to do so, the user must specify the new projection to be applied.

This process is extremely useful when standardising cartographies in the same project if these are in different projections.


Reprojection of a layer

Click on the geoprocessing wizard in the tool bar and select the “Reproject” option from the “Data conversion” folder.

reproyeccion.img/introduccionDatosReproyeccion_es.png

Click on “Open geoprocess”. The wizard will open to guide you through the reprojection process.

In “Input layer”, select the layer you wish to reproject from the layers loaded in the ToC.

To select the new projection for the layer, click on the button next to the destination projection and select the new reference system.

reproyeccion.img/reproyeccion_es.png

Exporting layers

Introduction

The “Export to...” tool allows you to save the elements selected in a layer in a different format. If no elements have been selected the whole layer will be exported. At the time of going to press the export formats supported by gvSIG were shape, dxf, and postgis and gml.


Exporting a shape

Select the “Layer” option from the menu bar then go to “Export to…/shp”.

exportar-capa/exportar-capa-en.img/menuExportarShape_en.png

If you have selected elements in the layer to be exported, gvSIG will tell you how many elements are going to be exported and will ask for confirmation before carrying out the operation.

exportar-capa/exportar-capa-en.img/exporarSHPDeseaContinuar_en.png

If you continue with the operation, a dialogue box will appear in which you will be asked to select the file the new shape is to be saved in.

When you have accepted, a new message will appear asking whether you wish to insert the new layer into the view.

exportar-capa/exportar-capa-en.img/insertarCapaEnLaVista_en.png

If you click on “Yes”, the layer will be added to the active view.


Exporting to dxf

Select the “Layer” option from the menu bar then go to “Export to…/dxf”.

exportar-capa/exportar-capa-en.img/exportarDXFMenu_en.png

Follow the same process used for exporting to shape.


Exporting to postgis and Oracle Spatial

Select the “Layer” option from the menu bar then go to “Export to…/postgis”.

../exportar-capa/exportar-capa-en.img/exportarPostGis_en.png

If you have selected any elements, a window will appear telling you how many elements are going to be exported (as in exporting to shp and dxf).

If you have selected any elements, a window will appear telling you how many elements are going to be exported (as in exporting to shp and dxf).

Remember that if the table already exists in the data base, the information it contains will be deleted.

../exportar-capa/exportar-capa-en.img/introducirNombreCapaPostGIS_en.png

Write the name of the table and click on “Ok”. A new window appears in which you will have to input the parameters of the data base connection.

../exportar-capa/exportar-capa-en.img/database_conection_en.png

he parameters are:

Name: Name of the connection.

Computer: IP address of the computer the data base is hosted in

Port: Port on which the computer is listening to the postgreSQL service.

User: User name recognised by the administrator to make the connection

Password: User password required to validate the connection. db: The data base the new table is to be created in.

Driver: Driver required for the data base. (At the time of going to press, drivers for postGIS and mySQL were available). When you have input the connection parameters, click on “Ok”.


Exporting to gml

Select the “Layer” option from the menu bar then go to “Export to…/gml”.

exportar-capa/exportar-capa-en.img/exportarGML_en.png

Follow the same process used for exporting to shp or dxf.


Exportar a kml

From the menu bar, select Layer > Export to... > Keyhole Markup Language (KML).

exportar-capa/exportar-capa-en.img/exportarKML_en.png

Layer menu, Export to KML

From here on the steps are exactly the same as for the Exporting to GML option.


Annotation layer
Introduction

This gvSIG tool makes advanced labelling easy.

The process creates a new layer which represents annotations.

The main features of this new layer can be summarised as follows:

  • The new layer is only composed of the annotations created.
  • The table associated with this new layer only contains the fields which refer to the text of the annotations (Text, Font, Colour, Height and Rotation).
  • The layer created is always in .shp format, irrespective of the format of the original layer.

Creating an annotation layer

To create an annotation layer, first select the layer from the ToC (Table of Contents).

capa-de-anotaciones-en.img/menucapaAnotaciones_en.png

In the menu bar, select the “Layer” option, then select “Export to” and finally select the “Annotation” option.

This option opens the wizard which will guide you through the steps required to create the annotation layer.

In the wizard’s first window, select the data which gvSIG requires to carry out the operation from the pull-down tab:

Duplicate control: Select either “None” or “Centred” to choose the position in which you wish the annotations to be inserted.

Centred: A label is created for each value and this will be inserted in the centre of all the labels which are the same.

None: A label is inserted for each value, even if these are repeated.

Select the field to be labelled: Choose the field which contains the text you wish the labels to show.

If you do not wish to modify the format of the annotations created by gvSIG and prefer a standard format, click on “Finish”. If you wish to customise the format, click on “Next”.

The wizard’s second window allows you to select the fields of attributes of a a table (if there are any) which contain the values which allow you to customise the labelling.

capa-de-anotaciones-en.img/TransformarCapaDeAnotaciones_es.png

The following parameters can be customised.

Slope – the slope the annotation will have in the view.

Colour – annotation text colour.

Height – annotation text height.

Units – units in which the value assigned to the “Height” field are to be measured.

The options currently available are map units or pixels.

Font – annotation text font.

Set the values to be used for customising the required parameter (by pulling down the list).

Leave the default value in the fields you do not wish to customise.

Click on “Finish” when you have input these changes.


Editing an annotation layer

An annotation layer can be edited like any other layer. To start an editing session in gvSIG, select the layer in the Table of Contents and then select the option “Start edition”.

capa-de-anotaciones/capa-de-anotaciones-en.img/MenuContextualCapaAnotaciones_es.png

When you start an editing session, an option appears in the menu bar called “Modify annotation”. This will allow you to individually customise the annotation you wish to change.

capa-de-anotaciones/capa-de-anotaciones-en.img/modificarAnotacion_es.png

When you click on this button, the appearance of the cursor will change. You may graphically select the annotation by clicking on the point associated with the text and then access a set of properties shown in the following image.


Annotation layer properties

If we select the “Properties” option from the annotation layer contextual menu, the following box appears:

capa-de-anotaciones/capa-de-anotaciones-en.img/PropiedadesDeLaCapa_es.png

The “Layer properties” box has two tabs. The “General” tab allows you to access the general properties of the layer and the “Annotations” tab allows you to select: whether you wish the annotation text to be shown in pixels or metres in the view.

Whether you want only the text to appear (select the “Draw text only” option) or if you prefer the text to be accompanied by a location point (deselect the “Draw text only” option).

However, remember that this point is useful, for example, to move the annotation or to access the “Modify annotation” window.

If you wish to avoid overlays, activate the “Avoid overlays” option.

If you wish to eliminate overlaying annotations, activate the “Clear overlaying annotations” option.


Adding an annotation layer to the view

To add an annotation layer, click on the “Add layer” button in the tool bar

capa-de-anotaciones/capa-de-anotaciones-en.img/BotonAnyadirCapa_es.png

and select the “Annotation” tab.

capa-de-anotaciones/capa-de-anotaciones-en.img/MenuAnyadirCapa_es.png

In the box you can select the annotation layer you wish to load, in addition to the units in which the annotations are displayed (pixels or metres) and the projection of the layer.


Example of how to create an annotation layer

The following image shows how an annotation layer is created out of a polygon layer called “muni10000.shp” which contains all the towns in the Valencian Region.

In the first window of the wizard, insert the type of duplicate control you wish to use and select the field which contains the text to be shown.

This is the field in a layer’s table of attributes which contains the name of the town.

If you do not wish to customise the presentation, click on “Finish” and indicate where you wish the new annotation layer to be saved.

capa-de-anotaciones/capa-de-anotaciones-en.img/EjemploCapaAnotaciones_es.png

The following image shows the result (the rest of the fields in the wizard are left with their default values and this one is zoomed in) of creating the “annotation layer”.

The annotation layer which has been created is the one in red called “Towns” in the Table of Contents.


Export to a raster layer

This tool allows you to extract portions of a raster layer using a selection in the view or by inputting the coordinates that define the portion to be extracted.

It allows the user to change the spatial resolution of the clipping or of the whole image, choose the bands to be extracted or generate a new raster layer for each of the original bands.

To access this option, go to the ToC and select the raster layer you wish to select a portion of.

Then go to the Layer/Export to menu and select the “Raster” option.

exportar-capa-raster-en.img/menuExportarRaster_es.png

The following window appears:

exportar-capa-raster-en.img/ventanaExportarRaster_es.png

Image clipping

There are two ways of selecting an area to be clipped from the original raster layer:

You can use the text boxes in the window to input the data which correspond to:

  • Real coordinates: If the source image is georeferenced.
  • Pixel coordinates: If the source image is not georeferenced.

You can also make your selection directly from the view by clipping the whole image or selecting a part of it.

This button allows you to obtain a clipping from the whole image.

This button allows you to obtain a clipping from a selected area in the view. Place the cursor over the image, then click and drag. Check that the text boxes are automatically completed.

If you wish to save the raster layer clipping you have created, click on “Save” and select the location you wish to save this file in. The image will be saved in TIF format.

exportar-capa-raster-en.img/botonSeleccionarPantalla_es.png

Changing spatial resolution

The controls that allow you to specify the clipping’s (or whole image) spatial resolution are located in the Clip table, with the additional options panel pulled down (to pull this panel down click on the button). You can define the resolution by specifying the Cell size or the Width and Height of the raster layer to be generated in pixels as well as choosing the interpolation method using the resolution change. At the moment, only the “Nearest neighbour” option is operational.

exportar-capa-raster-en.img/botonSeleccionarRecortePantalla_es.png

Band selection

The original raster layer’s band list appears at the bottom of the Clip table. You can use this list to choose the bands the output raster layer will have if you enable or disable the check boxes in the Bands column. If you check the Create one layer per band option, a new layer will be generated for each of the bands checked in the list. The new layers will be added to the ToC.

Saving and Adding a raster layer clipping to the current view.

When you have established all the parameters which define the raster layer clipping you have made, click on “Save”. This opens a dialogue box which allows you to search for a directory to save the clipping in. If you wish to add the layer to the view, go to the “Add layer” button in the tool bar once you have saved the clipping.

Example of a raster layer clipping

This example shows how a clipping is taken from an orthophoto.

First, select the area by defining a rectangle in the gvSIG view.

When you have finished, the coordinates will automatically be input into the text boxes based on the selection. You can fine tune these selected values from the view by inputting the new value directly into the text boxes containing the data.

Then pull down the box. As the resulting image is to be resampled, not as much resolution is required. Therefore, go to the “Spatial resolution” section and select “Width x Height”. This enables the text boxes so that you can input the output raster layer resolution.

When one value is input the other one is automatically completed when you press Enter or when you exit the field, as the proportions between the width and height must be maintained.

The cell size for the chosen output resolution is also calculated. If “Cell size” had been chosen, you would have had to specify the size in metres for each pixel and thus the width and height for the chosen cell size would have been calculated.

You now need to select the bands you want the output layer to have. In this case, select them all as this is a three-band orthophoto and we want to include them all.

Finally, for our example, the “Create a layer per band” option needs to be enabled to do just this.

Each new layer will have the same data type as the original image. If you click on “Save” a dialogue box opens to indicate the directory and image name.

To retrieve the layers you have created, go to the Add layer” button and then to the directory they were saved in.


Crear shape de geometrías derivadas

"New layer with derived geometries" tool.

This tool allows users to generate geometries derived from points or lines in a vector layer, and to store them as a new shape layer.

Table
Icon Description
habilitado Derived geometries tool enabled if the TOC contains at least one visible point or line vector layer that is not in edit mode.
deshabilitado Derived geometries tool disabled if the TOC does not contain any visible point or line vector layers that are not in edit mode.

The tool can be accessed from:

Via the menu: Layer / Derivative geometries

crear-shape-de-geometrias-derivadas_en.img/Ruta_en.png

Menu path to the tool

Layer selection dialog and process

Upon choosing the tool a dialog for selecting layers is displayed:

crear-shape-de-geometrias-derivadas_en.img/Seleccion_en.png

Selecting layers and process

  1. Source Layer: drop-down list of point or line vector layers in the current View that are not in edit mode. Select a layer to be the source layer.
  2. Name of the output layer: layer name that will appear in the TOC.
  3. Path of the output layer: full path for creating the new shapefile.
  4. Type of output layer: geometry type of the new layer. This depends on the type of process chosen (See options below).
  5. Type of process: select the type of geometry generation process. This depends on the geometry of the source layer. This process is applied to the source and destination layer pair until the tool is closed.
  6. Cancel: Close the tool.
  7. OK: Opens a control panel and displays data for the selected source layer. This control panel will be associated with source and output layers until it is cancelled.
Table
Source layer geometry type Type of process Target layer geometry type
Points Points to line Lines
Points Points to polygon Polygons
Lines Close polylines Polygons

Process Control Panel

The control panel is associated with the layer and is shown every time the layer is activated in the TOC, as long as the layer is visible and not in edit mode.

The dialog has a semi-modal behavior in order to allow the user to continue working with gvSIG by using the minimize, maximize, resize and hide buttons (use the X, not the Cancel button, to hide the dialog).

crear-shape-de-geometrias-derivadas_en.img/PuntosLineas_en.png

Process control panel

  1. Name of the source layer: Layer from the TOC that contains the source geometries.
  2. Name of the output layer: Name of the new derived geometry layer that will appear in the TOC.
  3. Table of features: Table showing the attributes of all the source layer's features. Source layer geometries selected in the View will also be selected in this table.
  4. Add all: Adds all the features of the source layer to the table of selected features.
  5. Remove all: Removes all features from the table of selected features.
  6. Enable snapping tool: Enables snapping tool on the source layer, without putting it into edit mode (only available in the Castilla y León extension for gvSIG 1.1.2).
  7. Add selected features: Adds only the selected features to the table.
  8. Remove selected features: Removes only the selected features from the table.
  9. Table of selected features: Table showing the attributes of all the features selected from the source layer. It has 2 extra columns:
    • Order: Order to be used when generating the new geometry from the selected features in a point source layer, or when closing polylines in the case of a line source layer. The order can be changed with buttons 10 and 11.
    • ID: Fixed ID number of the geometry in the vector layer.
  10. Move up: Moves the selected geometries up one position.
  11. Move down: Moves the selected geometries down one position.
  12. Create: Start the process of generating the derived geometries. If it doesn't already exist, a new layer is created, and the new geometries are added to this layer. The process is done in a thread, the progress of which is indicated by a progress bar.
crear-shape-de-geometrias-derivadas_en.img/ProcesoCreacion_en.png

Progress bar

The results of the completed process can be viewed by clicking on the "View Details" button. There are three types of data that are of interest here:

  • Number of geometries to create: depends on the geometry selected:
    • If they are of type point: one line or polygon is created.
    • If they are of type line: one polygon is created for each line.
  • Number of geometries that could not be created: the subprocess failed, for example because a polygon couldn't be derived from simple lines that consist of only two points.
  • Number of geometries created successfully: the new geometries created.

advert This information is recorded in the gvSIG log.

advert1 The control panel is hidden during the process but becomes visible again when the progress dialog is closed.

  1. Cancel: Closes the control panel and de-registers the associated tools, thereby terminating the tool for the specified source layer.
  2. Expand / Collapse: Changes the position of the splitter, so as to display only the table of features, only the table of selected features and associated management controls, or both halves of the control panel interface.

Control Panel Behaviour

The control panel is linked to the source layer from the time it is created until it is cancelled by clicking the cancel button.

Table
Action GUI Element Description
Maximize max Resizes the dialog so that it fills all available space.
Minimize min Minimizes the control panel to a restore button.
Collapse ocult Control panel is hidden but remains linked to both the source and output layers. Further operations between these layers can be performed once the panel is restored.
Resize   The size of the control panel can be increased or reduced by selecting and dragging the edge of the panel.
Expand / Collapse splitter interface expand These controls are used to display only the table of source layer features, or only the table of selected features and associated management controls, or both halves of the control panel interface.
Cancel cancel Closes the tool so that is no longer available for operations between the source and output layers.

advert2 When the control panel is hidden it can be restored it by clicking on the source layer in the TOC.

advert3 If the View is closed when control panels are visible, the panels will be hidden and then restored when the View is reopened.

triang Geometries derived from points do not retain any attribute values but do maintain the columns. Those derived from lines, keep all attributes.

triang2 Removing the new layer associated with control panel will result in the tool being ended and a warning being displayed to the user.

Examples

This example will show how to generate a line layer showing the path followed from home to work, and back again. The example uses the following four shape layers:

  • Land-use: layer showing parcel boundaries of the town.
  • Rivers: layer showing rivers in the town.
  • Lakes: layer showing lakes in the town.
  • GPS Waypoints: shape layer containing points recorded by a GPS on the drive to and from work. This layer will be used as the source layer in the example.

Once all four layers have been loaded the "Derived Geometries" tool can be selected and the following values entered:

  • Source layer:
    • Layer: GPS Waypoints
  • Output Layer:
    • Name: Route: Work to Home
    • Path: .../RouteWorkToHome.shp
    • Type: Lines
  • Options:
    • Mode of operation: points to line

When "OK" is clicked the new process control panel appears. If a file with the same name as the new output layer already exists then the user is asked whether to continue or not. If yes, then the file will be overwritten.

crear-shape-de-geometrias-derivadas_en.img/Guardar_en.png

Warning of an existing layer

Minimizing the control panel will reveal the View:

crear-shape-de-geometrias-derivadas_en.img/VistaEjemplo_en.png

View showing the layers

The geometries can be selected from the top table in the control panel.

We select the first seven geometry points (1st route: work to home).

crear-shape-de-geometrias-derivadas_en.img/Tabla_en.png

Selected geometries

Click "Create" to generate the first path:

crear-shape-de-geometrias-derivadas_en.img/VistaEjemplo2_en.png

Resulting route generated by the "Points to line" process

Modify the symbology so that the route stands out as a thick line.

To generate the route back, activate the control panel and select the remaining points from the source layer so that the line can be generated:

crear-shape-de-geometrias-derivadas_en.img/TablaVolver_en.png

Selected geometries

crear-shape-de-geometrias-derivadas_en.img/Resultado_en.png

Resulting new route

Finally suppose we are interested in the polygon formed by the closure of the routes.

Cancel the tool and then reopen it but this time use the new layer as the source:

  • Source layer:
    • Layer: Path: GPS Waypoints
  • Output Layer:
    • Name: Close routes
    • Path: .../CloseRoutes.shp
    • Type: Polylines
  • Options:
    • Mode of operation: close polylines
crear-shape-de-geometrias-derivadas_en.img/TipoProceso_en.png

Process "close polylines"

Select all the geometries (the two polylines) and generate the polygons.

crear-shape-de-geometrias-derivadas_en.img/TipoProceso2_en.png

Selected geometries

Since the layer "Route: Work to Home" does not contain data due to the points to line process, we assign a distinguishing identifier to each by editing the layer.

Now apply some changes to the symbolology:

  • Layer "Close routes": select a unique values symbology to distinguish the two polygons, and choose fill patterns that allow the lower layers to be seen.
  • Layer "GPS Waypoints": Use a symbol of a car for the points and place the layer above the other layers.
crear-shape-de-geometrias-derivadas_en.img/Resultado2_en.png

Results of the polygons generated by the "Close polylines" process


Get freemind document

View source document Get permanent link


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: